import { Entity, Column, PrimaryGeneratedColumn, ManyToOne, CreateDateColumn, UpdateDateColumn } from 'typeorm';
import { FollowUp } from './follow-up.entity';
import { User } from '../../users/entities/user.entity';

@Entity()
export class Approval {
  @PrimaryGeneratedColumn()
  id: number;

  @Column('text')
  content: string;

  @ManyToOne(() => FollowUp, followUp => followUp.approvals)
  followUp: FollowUp;

  @ManyToOne(() => User)
  createdBy: User;

  @CreateDateColumn()
  createdAt: Date;
} 